//package com.raptor.trustworthy.server.service.Impl;
//
//import com.raptor.trustworthy.server.properties.ZookeeperProperties;
//import com.raptor.trustworthy.server.service.ZookeeperHandle;
//import org.apache.curator.framework.CuratorFramework;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Qualifier;
//import org.springframework.stereotype.Service;
//
///**
// * 对zookeeper的操作
// *
// * @Author renhuan
// * @Date 2020-09-09 16:22
// **/
//@Service
//public class ZookeeperHandleImpl implements ZookeeperHandle {
//
//  @Autowired
//  @Qualifier("zkClient")
//  public CuratorFramework zkClient;
//
//
//  @Override
//  public String createTestNode(String path, String nodeName)  {
//    String remark = "";
//    try {
//      zkClient.create().forPath("/" + path + "/" + nodeName);
//      remark = "在" + path + "创建节点：" + nodeName;
//    } catch (Exception e) {
//      remark = e.toString();
//    }
//    return remark;
//  }
//
//  @Override
//  public String setTestNode(String path, String nodeName, String data)  {
//    String remark = "";
//    try {
//      zkClient.setData().forPath("/" + path + "/" + nodeName, data.getBytes());
//      remark = "在" + path + "下节点：" + nodeName + "写入数据：" + data.getBytes();
//    } catch (Exception e) {
//      remark = e.toString();
//    }
//    return remark;
//  }
//
//  @Override
//  public String getTestNode() {
//    return null;
//  }
//}
